<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><%@page
	language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="webctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
<title>dcfs_ssjk_main</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="GENERATOR"
	content="Rational® Application Developer™ for WebSphere® Software">
	
	<link rel="stylesheet" href="${webctx }/js/ext/resources/css/ext-all.css"
	type="text/css">
	<link rel="stylesheet" href="${webctx }/js/ext/resources/css/xtheme-gray.css" type="text/css">
<script language="JavaScript" src="${webctx }/js/ext/adapter/ext/ext-base.js"></script>
<script language="JavaScript" src="${webctx }/js/ext/js/ext-all.js"></script>
<script language="JavaScript"
	src="${webctx }/js/ext/resources/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="${webctx }/js/extInterceptor.js"></script>
	
<script language="JavaScript" src="${webctx }/ImageControler/amline/swfobject.js"></script>

<script type="text/javascript">



//window.setTimeout("location.href='Load_dcfs_ssjk_servlet'",5000);



/*var t;
function timedCount()
 {
 	t=setTimeout("timedCount()",6000);
	store.reload();
  } */
  
var so=new SWFObject("${webctx }/ImageControler/amline/amline.swf","amline","100%","250","8","#FFFFFF");
	so.addVariable("path","${webctx }/ImageControler/amline/");
	so.addVariable("chart_settings","<settings><error_messages> <color>#eeeeee</color><text_color>#e60000</text_color><text_size>14</text_size> </error_messages><strings><no_data>sorry, there is no query to the relevant data	</no_data><error_in_data_file>sorry, there is no query to the relevant data</error_in_data_file></strings></settings>");
	so.addParam("wmode", "transparent");

    

var jzsbbh='2';
 
Ext.onReady(function(){

  var viewport=new Ext.Viewport({
        layout:"fit",
        items:[
           {
              layout:{
	             type:'vbox',
	             padding:'2',
	             align:'stretch'     
              },
              defaults:{margins:'0 0 0 0'},
              items:[
                 {
                    xtype:'panel', 
                    id:"sa",                  
	                title:'数据统计图',
	                layout:"fit",
	                border:false,
	                flex:2,	                
	                contentEl:"flashcontent",	                         
	                tbar:[
	                   {
	                        xtype:"combo",                          
	                       // fieldLabel:"监测点",
	                         fieldLabel:"监测点",
	                        name: 'JCD_MC',
	                        id:"JKXT_MN",	                      
	                        editable:false, 
	                        triggerAction:'all', 
	                        store:new Ext.data.JsonStore({
	                            fields:[{name:"JKXT_MN"},{name:"JCD_MC"}],
	                            root:'root',
	                            url:"sssj_getDcfsHjjcdJbxxListByCond.action"
	                        }),
	                        mode:'local',
	                        valueField: 'JKXT_MN',
	                        displayField:'JCD_MC',
	                        selectOnFocus:true,
	                        emptyText:"请选择……",
	                        listeners:{
			                   "select": function() {
			                   		alert(Ext.getCmp("JKXT_MN").getValue());
			                        Ext.getCmp("jcsj_grid").getStore().load({params:{'dcfsHsEmstime.jkxtmn':Ext.getCmp("JKXT_MN").getValue()},callback:function(){
					            		so.addVariable("data_file", encodeURIComponent("sssj_getDcfsHsEmstimeListXml.action?dcfsHsEmstime.jkxtmn="+Ext.getCmp("JKXT_MN").getValue()));
										so.write("flashcontent");
					            	}}); 
			                    }
                            }
	                   }
	                ] ,
	                listeners:{
	                  "afterrender":function(){
	                    }
	                }    
                 },{
                 
                     xtype:'panel',
	                 layout:"fit",	                
	                 border:false,
	                 flex:2,
	                 items:[
	                    {
	                      xtype:"grid",
	                      title:"检测数据信息",				   
				          id:"jcsj_grid",
				          viewConfig:{ forceFit: true },
	                      loadMask:true,
	                      hieght:200,
	                       store:{
					           xtype:"jsonstore",
					           url:"sssj_getDcfsHsEmstimeListByCond.action",
					           root:"root",					          
					           fields:[
					               {name:"JKXT_MN"},{name:"Datatime"},{name:"Avalue"},
					               {name:"Flag"},{name:"DataState"}
					           ]
						         
					        },
					         columns:[
						      
						          {header:"设备数据标识码",dataIndex:"JKXT_MN"},
						          {header:"记录时间",dataIndex:"Datatime"},
						          {header:"实时值（V/m）",dataIndex:"Avalue"}
						          //{header:"数据标识",dataIndex:"Flag"},
						          //{header:"数据状态",dataIndex:"DataState"}					          
						      
					        ]
	                    }
	                 	                 
	                 ]
                 
                 }
              
              
              ],
              listeners:{
                 'afterrender':function(){
		            Ext.getCmp("JKXT_MN").getStore().load({params:{'dcfsHjjcdJbxx.jzsbbh':jzsbbh},callback:function(){
		            	Ext.getCmp("JKXT_MN").setValue( Ext.getCmp("JKXT_MN").store.getAt(0).get('JKXT_MN') );  
		            	alert(Ext.getCmp("JKXT_MN").getValue());
		            	Ext.getCmp("jcsj_grid").getStore().load({params:{'dcfsHsEmstime.jkxtmn':Ext.getCmp("JKXT_MN").getValue()},callback:function(){
		            		so.addVariable("data_file", encodeURIComponent("sssj_getDcfsHsEmstimeListXml.action?dcfsHsEmstime.jkxtmn="+Ext.getCmp("JKXT_MN").getValue()));
								so.write("flashcontent");
		            	}}); 
		            }});
           
                  }
         
               }
              
           }
              
        ] 
  
  });

   // Ext.getCmp("jcsj_grid").getStore().load(); 
     
});

	var fnid;
window.onload = function(){
    fnid = setInterval(fn,50000);
};

function fn(){
	Ext.getCmp("jcsj_grid").getStore().load({params:{'dcfsHsEmstime.jkxtmn':Ext.getCmp("JKXT_MN").getValue()},callback:function(){
		so.addVariable("data_file", encodeURIComponent("sssj_getDcfsHsEmstimeListXml.action?dcfsHsEmstime.jkxtmn="+Ext.getCmp("JKXT_MN").getValue()));
		so.write("flashcontent");
	}});         
};

</script>
</head>
<body>
<div id="flashcontent"><strong>You need to upgrade your
Flash Player</strong></div>

</body>
</html>